import React from 'react';
import ModalTableInModel from './../modalTableInModel/ModalTableInModel';
import Material from './../../interface/material';
import { model } from './data';

interface MaterielProps {
  visible: boolean;
  onCancel(): void;
  selectionType?: 'radio' | 'checkbox'
  onOk(data: Material[]): void
}

export default ({ visible, onCancel, onOk, selectionType } : MaterielProps) => {
  return (
    <ModalTableInModel width={900} onCancel={onCancel} onOk={onOk} 
    model={model} moduleName='' modelName='' visible={visible} rowSelectionType={selectionType || 'checkbox'}/>
  )
}